﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web;
using System.Web.Mvc;
namespace Model
{

    [MetadataType(typeof(SupplierContactRecord_Metadata))]
    [DisplayName("SupplierContactRecord")]
    public partial class SupplierContactRecord
    {
        public SupplierContactRecord()
        {
            this.Id = Guid.NewGuid();
            this.AddDate = DateTime.Now;
            this.UserId = new Guid(HttpContext.Current.User.Identity.Name);
        }

        public class SupplierContactRecord_Metadata
        {
            [ScaffoldColumn(false)]
            public Guid Id { get; set; }

            [ScaffoldColumn(false)]
            public Guid UserId { get; set; }

            [DisplayName("供应商")]
            [Required(ErrorMessage = "供应商不能为空")]
            [DropDownList("SupplierId", "Id", "SupplierName")]
            public object SupplierId { get; set; }

            [DisplayName("供应商联系人")]
            [Required(ErrorMessage = "供应商联系人不能为空")]
            [DropDownList("SupplierContactId", "Id", "ContactName")]
            public object SupplierContactId { get; set; }

            [DisplayName("联系时间")]
            [DataType(DataType.DateTime)]
            public object ContactDate { get; set; }

            [DisplayName("内容")]
            [Required(ErrorMessage = "内容为必填项")]
            [DataType(DataType.MultilineText)]
            public object Description { get; set; }

            [DisplayName("负责人")]
            [DropDownList("Sys_Users", "Id", "UserName")]
            public object AdminId { get; set; }

            [DisplayName("添加日期")]
            [ScaffoldColumn(false)]
            [DataType(DataType.DateTime)]
            public object AddDate { get; set; }

            //[DisplayName("标题")]
            //[Required]
            //public object Title { get; set; }



        }
    }
}
